Measurement of anxiety and pain